import { typeToComponent } from '@/utils'

export default function (arg) {
    return {
        props: {
            ...arg,
            position: arg.isUser ? "right" : "left",
        },

        events: {
            'on-click': () => {
                console.log(this);
            }
        },

        component: typeToComponent(arg.type)
    }

}